package com.smartstate.ems.mapper;

import cn.hutool.core.date.DateTime;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smartstate.ems.entity.PowerEquipmentEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@DS("tdengine")
public interface EquipmentPowerMapper extends BaseMapper<PowerEquipmentEntity> {


    @Select("select * from sh_${string} where ts >= #{startTime} and ts <= #{endTime} ")
    List<PowerEquipmentEntity> getPower(DateTime startDate, DateTime endDate, String string);
}
